INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/public)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/common/inc)

# find pthread lib
FIND_PACKAGE(Threads)

SET(SRC_LISTS main.c)

LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH})

ADD_EXECUTABLE(${CMAKE_PROJECT_NAME} ${SRC_LISTS})

if (CONFIG_COMMON_CRC)
    TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME} common)
#    TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME} softcrc)
#    TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME} -lsoftcrc)
endif (CONFIG_COMMON_CRC)

if (CONFIG_COMMON_MXML)
    TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME} mxml)
endif (CONFIG_COMMON_MXML)

# link pthread lib
TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

